<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:s="http://jboss.com/products/seam/taglib"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:rich="http://richfaces.org/rich"
                xmlns:a="http://richfaces.org/a4j"
                template="layout/template.xhtml">

    <ui:define name="body">

        <h:messages globalOnly="true" styleClass="message"/>

        <rich:panel id="sloList">
            <f:facet name="header">#{messages['slo.list.header']}</f:facet>

            <div class="results">

                <h:outputText value="#{messages['slo.list.noslo']}"
                              rendered="#{empty studentLearningOutcomeList.resultList}"/>

                <rich:dataTable id="studentLearningOutcomeList" var="_studentLearningOutcome"
                                value="#{studentLearningOutcomeList.resultList}"
                                rendered="#{not empty studentLearningOutcomeList.resultList}">
                    <rich:column>
                        <f:facet name="header">#{messages['date']}</f:facet>
                        <h:outputText value="#{_studentLearningOutcome.date}">
                            <s:convertDateTime type="date" />
                        </h:outputText>
                    </rich:column>
                    <rich:column>
                        <f:facet name="header">#{messages['slo.company']}</f:facet>
                        <h:selectBooleanCheckbox id="inCooperationWithCompany" disabled="true"
                                                 value="#{_studentLearningOutcome.inCooperationWithCompany}" />
                    </rich:column>
                    <rich:column>
                        <f:facet name="header">#{messages['student']}</f:facet>
                        #{_studentLearningOutcome.student.name}
                    </rich:column>
                    <rich:column>
                        <f:facet name="header">#{messages['details']}</f:facet>
                        <s:link id="sLOdetails" view="/studentLearningOutcome.xhtml"
                                value="#{messages['show']}">
                            <f:param name="studentLearningOutcomeId" value="#{_studentLearningOutcome.id}" />
                            <f:param name="studentNumber" value="#{_studentLearningOutcome.student.studentNumber}" />
                        </s:link>
                    </rich:column>
                </rich:dataTable>

            </div>

        </rich:panel>
        <div class="actionButtons">
            <s:button id="create"
                      value="#{messages['slo.create']}"
                      view="/studentLearningOutcomeEdit.xhtml"/>
        </div>

    </ui:define>

</ui:composition>